import { lazy } from "react";
export const mainRoutes = [
    {
        path:'/index/home',
        element:lazy(()=>import('../page/index/Home')),
        title:'首页'
    },
    {
        path:'/index/classify',
        element:lazy(()=>import('../page/index/Classify')),
        title:'分类'
    },
    {
        path:'/index/shopcar',
        element:lazy(()=>import('../page/index/ShopCar')),
        title:'购物车'
    },
    {
        path:'/index/my',
        element:lazy(()=>import('../page/index/My')),
        title:'我的'
    },
]
const routes = [
    {
        from:'/',
        to:'/index/home'
    },
    {
        path:'/index',
        element:lazy(()=>import('../page/Index')),
        children:mainRoutes
    },
    {
        path:'/detail/:id',
        element:lazy(()=>import('../page/Detail'))
    },
    {
        path:'/login',
        element:lazy(()=>import('../page/Login'))
    },
    {
        path:'*',
        element:lazy(()=>import('../page/Eorry'))
    }
]
export default routes